<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>mysql备份-xtrabackup | manor blog</title>
  
    <meta name="keywords" content=" mysql ">
  
  <meta name="description" content="mysql备份-xtrabackup | manor blog">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="个人简介pgmanor，程序员一名。 喜欢研究技术，涉及GO、JAVA、微服务、大数据领域。目前主要从事微服务。 联系方式 QQ : 2307546059 (pgmanor) 邮箱 :pgmanor@qq.com">
<meta property="og:type" content="website">
<meta property="og:title" content="关于">
<meta property="og:url" content="https://pgmanor.gitee.io/blog/about/index.html">
<meta property="og:site_name" content="manor blog">
<meta property="og:description" content="个人简介pgmanor，程序员一名。 喜欢研究技术，涉及GO、JAVA、微服务、大数据领域。目前主要从事微服务。 联系方式 QQ : 2307546059 (pgmanor) 邮箱 :pgmanor@qq.com">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-12-30T16:00:00.000Z">
<meta property="article:modified_time" content="2020-12-15T14:30:19.631Z">
<meta property="article:author" content="pgmanor">
<meta property="article:tag" content="pgmanor">
<meta property="article:tag" content="blog">
<meta name="twitter:card" content="summary">


<link rel="icon" href="/blog/img/pgmanor_blog.svg">

<link href="/blog/css/style.css?v=1.0.1x" rel="stylesheet">

<link href="/blog/css/hl_theme/atom-light.css?v=1.0.1x" rel="stylesheet">

<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/js/fontawesome.min.js" rel="stylesheet">

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="/blog/js/jquery.autocomplete.min.js?v=1.0.1x" ></script>
<script src="/blog/js/titleTip.js?v=1.0.1x" ></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/highlight.min.js"></script>
<script>
    hljs.initHighlightingOnLoad();
</script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>



<script src="/blog/js/iconfont.js?v=1.0.1x" ></script>

<meta name="generator" content="Hexo 4.2.1"></head>
<div style="display: none">
  <input class="theme_disqus_on" value="false">
  <input class="theme_preload_comment" value="false">
  <input class="theme_blog_path" value="/blog">
  <input id="theme_highlight_on" value="true" />
  <input id="theme_code_copy" value="true" />
</div>




<body>
<aside class="nav">
    <div class="nav-left">
        <a href="/blog/" class="avatar_target">
    <img class="avatar" src="/blog/img/pgmanor_blog.svg" />
</a>
<div class="author">
    <span>pgmanor</span>
</div>

<div class="icon">
    
        
        <a title="github" href="https://gitee.com/pgmanor" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-github"></use>
                </svg>
            
        </a>
        
    
        
        <a title="csdn" href="https://blog.csdn.net/u011622109" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-csdn"></use>
                </svg>
            
        </a>
        
    
        
        <a title="email" href="mailto:pgmanor@qq.com" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-email"></use>
                </svg>
            
        </a>
        
    
        
        <a title="qq" href="http://wpa.qq.com/msgrd?v=3&uin=2307546059&site=qq&menu=yes" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-qq"></use>
                </svg>
            
        </a>
        
    
        
        <a title="kugou" href="https://www.kugou.com/" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-kugou"></use>
                </svg>
            
        </a>
        
    
        
        <a title="neteasemusic" href="https://music.163.com/" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-neteasemusic"></use>
                </svg>
            
        </a>
        
    
</div>



<a class="more-menus">更多菜单</a>


<ul>
    <li><div class="all active">全部文章<small>(129)</small></div></li>
    
        
            
            <li><div data-rel="博客"><i class="fold iconfont icon-right"></i>博客<small>(108)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="B---大数据">B---大数据<small>(4)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="C-----并发">C-----并发<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="D--数据库">D--数据库<small>(16)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="D-devops">D-devops<small>(5)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="F-----架构">F-----架构<small>(10)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="I-----面试">I-----面试<small>(2)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="J-----java">J-----java<small>(14)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="M--微服务">M--微服务<small>(6)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="P-python">P-python<small>(9)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="T-----工具">T-----工具<small>(26)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="T-----测试">T-----测试<small>(6)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="W-----前端">W-----前端<small>(4)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="W-window">W-window<small>(3)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="微服务">微服务<small>(2)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
            <li><div data-rel="农场"><i class="fold iconfont icon-right"></i>农场<small>(10)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="微服务">微服务<small>(1)</small></div>
                            
                        </li>
                            
                        <li><div data-rel="算法">算法<small>(8)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
            <li><div data-rel="项目">项目<small>(9)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="加密">加密<small>(2)</small></div>
                
            </li>
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
        
            
        
    
</ul>
<div class="left-bottom">
    <div class="menus">
    
    
    
    <a class="dynamic-menu " target="_blank"  href="https://www.iworkh.com/">iworkh</a>
    
    
    <a class="dynamic-menu " target="_blank"  href="https://gitee.com/pgmanor">gitee</a>
    
    </div>
    <div><a class="about  hasFriend  site_url"  href="/blog/about">关于</a><a style="width: 50%"  class="friends">友链</a></div>
</div>
<input type="hidden" id="iworkh_site_posts_number" value="129">
<input type="hidden" id="iworkh_site_word_count" value="273k">
<div style="display: none">
    <span id="busuanzi_value_site_uv"></span>
    <span id="busuanzi_value_site_pv"></span>
</div>

    </div>
    <div class="nav-right">
        <div class="friends-area">
    <div class="friends-title">
        友情链接
        <i class="back-title-list"></i>
    </div>
    <div class="friends-content">
        <ul>
            
            <li><a target="_blank" href="https://www.iworkh.com">iworkh</a></li>
            
            <li><a target="_blank" href="https://www.iworkh.com/download/share/">下载地址</a></li>
            
            <li><a target="_blank" href="http://yelog.org/">叶落阁</a></li>
            
        </ul>
    </div>
</div>
        <div class="title-list">
    <form onkeydown="if(event.keyCode === 13){return false;}">
        <input id="local-search-input" class="search" type="text" placeholder="in: 开头全文搜索" />
        <i class="cross"></i>
        <span>
            <label for="tagswitch">T:</label>
            <input id="tagswitch" type="checkbox" style="display: none" />
            <i id="tagsWitchIcon"></i>
        </span>
    </form>
    <div class="tags-list">
    
    <li class="article-tag-list-item">
        <a class="color4">AQS</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">attr</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">aysnc</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">beanmap</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">bigdecimal</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">blog</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">chrome</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">dict</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">dll</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">doc</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">docker</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">domain</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">elementadmin</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">es</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">excel</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">farm</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">fastjson</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">func</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">git</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">github</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">guide</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">hadoop</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">hexo</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">idea</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">initialzr</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">jackson</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">java</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">jboss</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">jdni</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">jetbrains</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">jfinalshell</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">joplin</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">JPA</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">junit</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">jupyter</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">keepavlie</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">kill</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">linux</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">LocalDate</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">lock</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">markdown</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">maven</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">message</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">mock</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">mq</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">mycat</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">mysql</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">nginx</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">notebook</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">postman</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">powermock</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">python</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">redis</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">rest</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">sharding-jdbc</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">spark</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">springboot</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color2">testng</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">tornado</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color1">track</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">transactional</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">uuid</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">vuepress</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">web</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">windows</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">zookeeper</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">分库分表</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">分页</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">加密</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">启动</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">工具</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">并发</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">序列化</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">微服务</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">性能分析</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">手册</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color4">有道云</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">模板</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color5">百度云盘</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">算法</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">面试</a>
    </li>
    
    <li class="article-tag-list-item">
        <a class="color3">项目</a>
    </li>
    
    <div class="clearfix"></div>
</div>

    
    <div id="local-search-result">

    </div>
    
    <nav id="title-list-nav">
        
        <a id="top" class="农场 "
           href="/blog/2020/12/31/farm-manual-summary/"
           data-tag="手册,farm"
           data-author="pgmanor" >
            <span class="post-title" title="手册汇总">手册汇总</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a id="top" class="农场 微服务 "
           href="/blog/2020/12/31/farm-spring-boot-all-resources/"
           data-tag="springboot"
           data-author="pgmanor" >
            <span class="post-title" title="Spring Boot全网优质教程汇总">Spring Boot全网优质教程汇总</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a id="top" class="加密 "
           href="/blog/2021/01/10/secret-farm-mysql/"
           data-tag="mysql"
           data-author="pgmanor" >
            <span class="post-title" title="mysql密钥">mysql密钥</span>
            <span class="post-date" title="2021-01-10 00:00:00">2021/01/10</span>
        </a>
        
        <a id="top" class="加密 "
           href="/blog/2020/12/31/secret-baidu-pandisk-share/"
           data-tag="百度云盘"
           data-author="pgmanor" >
            <span class="post-title" title="百度云盘分享链接">百度云盘分享链接</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a id="top" class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-jetbrains-idea/"
           data-tag="idea"
           data-author="pgmanor" >
            <span class="post-title" title="idea使用技巧">idea使用技巧</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a id="top" class="博客 T-----工具 "
           href="/blog/2021/03/14/blog-tool-online/"
           data-tag="blog"
           data-author="pgmanor" >
            <span class="post-title" title="常用在线工具">常用在线工具</span>
            <span class="post-date" title="2021-03-14 00:00:00">2021/03/14</span>
        </a>
        
        <a id="top" class="博客 W-----前端 "
           href="/blog/2020/12/31/blog-web/"
           data-tag="web"
           data-author="pgmanor" >
            <span class="post-title" title="前端常用工具">前端常用工具</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/09/12/project-guide-http/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="模拟http请求">模拟http请求</span>
            <span class="post-date" title="2021-09-12 00:00:00">2021/09/12</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/09/12/blog-tool-chrome-disable-cros/"
           data-tag="chrome"
           data-author="pgmanor" >
            <span class="post-title" title="禁用Chrome跨域">禁用Chrome跨域</span>
            <span class="post-date" title="2021-09-12 00:00:00">2021/09/12</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/09/04/project-guide-download-excel/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="vue和hutool工具实现excel下载">vue和hutool工具实现excel下载</span>
            <span class="post-date" title="2021-09-04 00:00:00">2021/09/04</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/09/04/project-guide-param-pass-array/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="axios参数传数组">axios参数传数组</span>
            <span class="post-date" title="2021-09-04 00:00:00">2021/09/04</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2021/08/15/blog-mysql-backup-cron/"
           data-tag="mysql"
           data-author="pgmanor" >
            <span class="post-title" title="cron定时器">cron定时器</span>
            <span class="post-date" title="2021-08-15 00:00:00">2021/08/15</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2021/08/14/blog-mysql-backup-xtrabackup/"
           data-tag="mysql"
           data-author="pgmanor" >
            <span class="post-title" title="mysql备份-xtrabackup">mysql备份-xtrabackup</span>
            <span class="post-date" title="2021-08-14 00:00:00">2021/08/14</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2021/08/14/blog-mysql-backup-xtrabackup-scripts/"
           data-tag="mysql"
           data-author="pgmanor" >
            <span class="post-title" title="mysql备份-xtrabackup-脚本">mysql备份-xtrabackup-脚本</span>
            <span class="post-date" title="2021-08-14 00:00:00">2021/08/14</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/08/08/project-guide-devops-slowquery/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="SQL慢查询">SQL慢查询</span>
            <span class="post-date" title="2021-08-08 00:00:00">2021/08/08</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2021/08/08/blog-mysql-backup-summary/"
           data-tag="mysql"
           data-author="pgmanor" >
            <span class="post-title" title="mysql备份">mysql备份</span>
            <span class="post-date" title="2021-08-08 00:00:00">2021/08/08</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/08/08/project-guide-springboot-upgrade/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="springboot升级到2.5.x遇到的问题">springboot升级到2.5.x遇到的问题</span>
            <span class="post-date" title="2021-08-08 00:00:00">2021/08/08</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2021/08/07/blog-fw-es-install/"
           data-tag="es"
           data-author="pgmanor" >
            <span class="post-title" title="ElasticSearch安装和使用">ElasticSearch安装和使用</span>
            <span class="post-date" title="2021-08-07 00:00:00">2021/08/07</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/08/07/project-guide-log-analysis/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="日志分析">日志分析</span>
            <span class="post-date" title="2021-08-07 00:00:00">2021/08/07</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/08/07/project-guide-devops-monitor/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="运维监控">运维监控</span>
            <span class="post-date" title="2021-08-07 00:00:00">2021/08/07</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/08/01/blog-tool-postman/"
           data-tag="postman"
           data-author="pgmanor" >
            <span class="post-title" title="postman工具使用">postman工具使用</span>
            <span class="post-date" title="2021-08-01 00:00:00">2021/08/01</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/08/01/blog-tool-bug-track/"
           data-tag="track"
           data-author="pgmanor" >
            <span class="post-title" title="bug跟踪工具">bug跟踪工具</span>
            <span class="post-date" title="2021-08-01 00:00:00">2021/08/01</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2021/08/01/blog-java-kill/"
           data-tag="kill"
           data-author="pgmanor" >
            <span class="post-title" title="java项目如何优雅关闭程序">java项目如何优雅关闭程序</span>
            <span class="post-date" title="2021-08-01 00:00:00">2021/08/01</span>
        </a>
        
        <a  class="博客 M--微服务 "
           href="/blog/2021/07/25/blog-spring-boot-logback/"
           data-tag="springboot"
           data-author="pgmanor" >
            <span class="post-title" title="springboot logback多环境">springboot logback多环境</span>
            <span class="post-date" title="2021-07-25 00:00:00">2021/07/25</span>
        </a>
        
        <a  class="博客 W-----前端 "
           href="/blog/2021/06/18/blog-vue-element-admin-keepalive/"
           data-tag="keepavlie"
           data-author="pgmanor" >
            <span class="post-title" title="vue中keep alive失效">vue中keep alive失效</span>
            <span class="post-date" title="2021-06-18 00:00:00">2021/06/18</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2021/06/14/blog-java-start/"
           data-tag="启动"
           data-author="pgmanor" >
            <span class="post-title" title="java启动方式">java启动方式</span>
            <span class="post-date" title="2021-06-14 00:00:00">2021/06/14</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/05/31/project-guide-vue-component/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="vue封装组件">vue封装组件</span>
            <span class="post-date" title="2021-05-31 00:00:00">2021/05/31</span>
        </a>
        
        <a  class="项目 "
           href="/blog/2021/05/09/project-guide-vue-full-calendar/"
           data-tag="项目,guide"
           data-author="pgmanor" >
            <span class="post-title" title="vue-full-calendar日历">vue-full-calendar日历</span>
            <span class="post-date" title="2021-05-09 00:00:00">2021/05/09</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2021/05/04/blog-redis-local/"
           data-tag="redis"
           data-author="pgmanor" >
            <span class="post-title" title="嵌入redis和可视化界面">嵌入redis和可视化界面</span>
            <span class="post-date" title="2021-05-04 22:48:35">2021/05/04</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/03/14/blog-tool-doc/"
           data-tag="doc"
           data-author="pgmanor" >
            <span class="post-title" title="文档工具">文档工具</span>
            <span class="post-date" title="2021-03-14 00:00:00">2021/03/14</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2021/03/14/blog-jpa-anno-generatedValue/"
           data-tag="JPA"
           data-author="pgmanor" >
            <span class="post-title" title="JPA注解@GeneratedValue">JPA注解@GeneratedValue</span>
            <span class="post-date" title="2021-03-14 00:00:00">2021/03/14</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/03/14/blog-tool-chrome/"
           data-tag="chrome"
           data-author="pgmanor" >
            <span class="post-title" title="Chrome调试技巧">Chrome调试技巧</span>
            <span class="post-date" title="2021-03-14 00:00:00">2021/03/14</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/03/14/blog-vuepress-fulltext-search/"
           data-tag="vuepress"
           data-author="pgmanor" >
            <span class="post-title" title="vuepress支持全文搜索">vuepress支持全文搜索</span>
            <span class="post-date" title="2021-03-14 00:00:00">2021/03/14</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2021/03/07/blog-redis-type-string-sds/"
           data-tag="redis"
           data-author="pgmanor" >
            <span class="post-title" title="Redis为什么将String设计成SDS">Redis为什么将String设计成SDS</span>
            <span class="post-date" title="2021-03-07 00:00:00">2021/03/07</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2021/03/07/blog-redis-fast/"
           data-tag="redis"
           data-author="pgmanor" >
            <span class="post-title" title="Redis为什么这么快">Redis为什么这么快</span>
            <span class="post-date" title="2021-03-07 00:00:00">2021/03/07</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2021/03/07/blog-redis-type-six/"
           data-tag="redis"
           data-author="pgmanor" >
            <span class="post-title" title="Redis的6大数据类型">Redis的6大数据类型</span>
            <span class="post-date" title="2021-03-07 00:00:00">2021/03/07</span>
        </a>
        
        <a  class="博客 微服务 "
           href="/blog/2021/03/06/blog-spring-boot-h2/"
           data-tag="springboot"
           data-author="pgmanor" >
            <span class="post-title" title="springboot整合h2">springboot整合h2</span>
            <span class="post-date" title="2021-03-06 00:00:00">2021/03/06</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2021/02/28/blog-java-md5/"
           data-tag="uuid"
           data-author="pgmanor" >
            <span class="post-title" title="MD5加密">MD5加密</span>
            <span class="post-date" title="2021-02-28 00:00:00">2021/02/28</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2021/02/28/blog-java-uuid/"
           data-tag="uuid"
           data-author="pgmanor" >
            <span class="post-title" title="UUID">UUID</span>
            <span class="post-date" title="2021-02-28 00:00:00">2021/02/28</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2021/02/28/blog-java-base64/"
           data-tag="uuid"
           data-author="pgmanor" >
            <span class="post-title" title="base64加解密">base64加解密</span>
            <span class="post-date" title="2021-02-28 00:00:00">2021/02/28</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2021/02/27/blog-java-new8-date-opertaion.md/"
           data-tag="LocalDate"
           data-author="pgmanor" >
            <span class="post-title" title="java8日期操作">java8日期操作</span>
            <span class="post-date" title="2021-02-27 00:00:00">2021/02/27</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2021/01/24/blog-jpa-entity-manager/"
           data-tag="JPA"
           data-author="pgmanor" >
            <span class="post-title" title="JPA之EntityManager">JPA之EntityManager</span>
            <span class="post-date" title="2021-01-24 00:00:00">2021/01/24</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2021/01/24/blog-jpa-relationship/"
           data-tag="JPA"
           data-author="pgmanor" >
            <span class="post-title" title="JPA表与表关系映射">JPA表与表关系映射</span>
            <span class="post-date" title="2021-01-24 00:00:00">2021/01/24</span>
        </a>
        
        <a  class="博客 W-----前端 "
           href="/blog/2021/01/24/blog-web-CodeMirror/"
           data-tag="web"
           data-author="pgmanor" >
            <span class="post-title" title="CodeMirror">CodeMirror</span>
            <span class="post-date" title="2021-01-24 00:00:00">2021/01/24</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/01/10/blog-vuepress-theme-password/"
           data-tag="vuepress"
           data-author="pgmanor" >
            <span class="post-title" title="vuepress-theme-reco源码密钥修改">vuepress-theme-reco源码密钥修改</span>
            <span class="post-date" title="2021-01-10 00:00:00">2021/01/10</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/01/03/blog-tool-encryption/"
           data-tag="加密"
           data-author="pgmanor" >
            <span class="post-title" title="在线加密工具">在线加密工具</span>
            <span class="post-date" title="2021-01-03 10:08:09">2021/01/03</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/01/02/blog-tool-jboss-password/"
           data-tag="jboss"
           data-author="pgmanor" >
            <span class="post-title" title="jboss数据库密码加解密">jboss数据库密码加解密</span>
            <span class="post-date" title="2021-01-02 00:00:00">2021/01/02</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2021/01/02/blog-tool-excel-hidden-col/"
           data-tag="excel"
           data-author="pgmanor" >
            <span class="post-title" title="excel隐藏空白列">excel隐藏空白列</span>
            <span class="post-date" title="2021-01-02 00:00:00">2021/01/02</span>
        </a>
        
        <a  class="博客 微服务 "
           href="/blog/2021/01/02/blog-spring-boot-run-withparam-windows/"
           data-tag="springboot"
           data-author="pgmanor" >
            <span class="post-title" title="springboot项目多环境运行报错 windows">springboot项目多环境运行报错 windows</span>
            <span class="post-date" title="2021-01-02 00:00:00">2021/01/02</span>
        </a>
        
        <a  class="农场 算法 "
           href="/blog/2020/12/31/farm-data-structures-algorithms-sort/"
           data-tag="算法"
           data-author="pgmanor" >
            <span class="post-title" title="数据结构和算法8-排序">数据结构和算法8-排序</span>
            <span class="post-date" title="2020-12-31 08:00:00">2020/12/31</span>
        </a>
        
        <a  class="农场 算法 "
           href="/blog/2020/12/31/farm-data-structures-algorithms-search/"
           data-tag="算法"
           data-author="pgmanor" >
            <span class="post-title" title="数据结构和算法7-搜索">数据结构和算法7-搜索</span>
            <span class="post-date" title="2020-12-31 07:00:00">2020/12/31</span>
        </a>
        
        <a  class="农场 算法 "
           href="/blog/2020/12/31/farm-data-structures-algorithms-graph/"
           data-tag="算法"
           data-author="pgmanor" >
            <span class="post-title" title="数据结构和算法6-非线性-图">数据结构和算法6-非线性-图</span>
            <span class="post-date" title="2020-12-31 06:00:00">2020/12/31</span>
        </a>
        
        <a  class="农场 算法 "
           href="/blog/2020/12/31/farm-data-structures-algorithms-tree/"
           data-tag="算法"
           data-author="pgmanor" >
            <span class="post-title" title="数据结构和算法5-非线性-树">数据结构和算法5-非线性-树</span>
            <span class="post-date" title="2020-12-31 05:00:00">2020/12/31</span>
        </a>
        
        <a  class="农场 算法 "
           href="/blog/2020/12/31/farm-data-structures-algorithms-linear-queue/"
           data-tag="算法"
           data-author="pgmanor" >
            <span class="post-title" title="数据结构和算法4-线性-队列">数据结构和算法4-线性-队列</span>
            <span class="post-date" title="2020-12-31 04:00:00">2020/12/31</span>
        </a>
        
        <a  class="农场 算法 "
           href="/blog/2020/12/31/farm-data-structures-algorithms-linear-stack/"
           data-tag="算法"
           data-author="pgmanor" >
            <span class="post-title" title="数据结构和算法3-线性-栈">数据结构和算法3-线性-栈</span>
            <span class="post-date" title="2020-12-31 03:00:00">2020/12/31</span>
        </a>
        
        <a  class="农场 算法 "
           href="/blog/2020/12/31/farm-data-structures-algorithms-linear-list/"
           data-tag="算法"
           data-author="pgmanor" >
            <span class="post-title" title="数据结构和算法2-线性-链">数据结构和算法2-线性-链</span>
            <span class="post-date" title="2020-12-31 02:00:00">2020/12/31</span>
        </a>
        
        <a  class="农场 算法 "
           href="/blog/2020/12/31/farm-data-structures-algorithms-info/"
           data-tag="算法"
           data-author="pgmanor" >
            <span class="post-title" title="数据结构和算法1-介绍">数据结构和算法1-介绍</span>
            <span class="post-date" title="2020-12-31 01:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D-devops "
           href="/blog/2020/12/31/blog-devops-linux-jfinalshell/"
           data-tag="jfinalshell"
           data-author="pgmanor" >
            <span class="post-title" title="linux连接工具jfinalshell">linux连接工具jfinalshell</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-python-tool-buildin-func/"
           data-tag="func"
           data-author="pgmanor" >
            <span class="post-title" title="👍python内置函数">👍python内置函数</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-jpa-query-multi-param/"
           data-tag="JPA"
           data-author="pgmanor" >
            <span class="post-title" title="JPA多条件查询">JPA多条件查询</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-jpa-query/"
           data-tag="JPA"
           data-author="pgmanor" >
            <span class="post-title" title="JPA自定义sql">JPA自定义sql</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2020/12/31/blog-fw-mq-message-missing/"
           data-tag="mq,message"
           data-author="pgmanor" >
            <span class="post-title" title="MQ如何保证消息不丢失?">MQ如何保证消息不丢失?</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 B---大数据 "
           href="/blog/2020/12/31/blog-hadoop-install-windows/"
           data-tag="hadoop"
           data-author="pgmanor" >
            <span class="post-title" title="hadoop开发环境搭建">hadoop开发环境搭建</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-mysql-lock-unlock-table/"
           data-tag="lock"
           data-author="pgmanor" >
            <span class="post-title" title="mysql数据库锁查询和释放">mysql数据库锁查询和释放</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-ai-python-spark-env/"
           data-tag="spark"
           data-author="pgmanor" >
            <span class="post-title" title="python spark开发环境搭建">python spark开发环境搭建</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-mysql-windows-zip-install/"
           data-tag="mysql"
           data-author="pgmanor" >
            <span class="post-title" title="mysql zip在windows上安装">mysql zip在windows上安装</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-python_install/"
           data-tag="python"
           data-author="pgmanor" >
            <span class="post-title" title="python环境安装">python环境安装</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D-devops "
           href="/blog/2020/12/31/blog-devops-docker-introduction/"
           data-tag="docker"
           data-author="pgmanor" >
            <span class="post-title" title="👍docker入门看这一篇就够了">👍docker入门看这一篇就够了</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 I-----面试 "
           href="/blog/2020/12/31/blog-interview-company/"
           data-tag="面试"
           data-author="pgmanor" >
            <span class="post-title" title="IT互联网公司名单">IT互联网公司名单</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2020/12/31/blog-java-base-domain/"
           data-tag="domain"
           data-author="pgmanor" >
            <span class="post-title" title="VO DTO DO PO你都了解吗?">VO DTO DO PO你都了解吗?</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2020/12/31/blog-java-base-serializable/"
           data-tag="序列化"
           data-author="pgmanor" >
            <span class="post-title" title="java序列化">java序列化</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-hexo-theme-math/"
           data-tag="hexo"
           data-author="pgmanor" >
            <span class="post-title" title="hexo主题支持MathJax">hexo主题支持MathJax</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 C-----并发 "
           href="/blog/2020/12/31/blog-java-concurrent-aqs/"
           data-tag="AQS,并发"
           data-author="pgmanor" >
            <span class="post-title" title="java并发AQS">java并发AQS</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-java-dao-sharding-db/"
           data-tag="分库分表"
           data-author="pgmanor" >
            <span class="post-title" title="分库分表中间件-开源产品">分库分表中间件-开源产品</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 B---大数据 "
           href="/blog/2020/12/31/blog-spark-install-windows/"
           data-tag="spark"
           data-author="pgmanor" >
            <span class="post-title" title="spark开发环境搭建">spark开发环境搭建</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-jetbrains-crack/"
           data-tag="idea,jetbrains"
           data-author="pgmanor" >
            <span class="post-title" title="jetbrains全家桶破解">jetbrains全家桶破解</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 M--微服务 "
           href="/blog/2020/12/31/blog-spring-boot-multi-profiles/"
           data-tag="springboot"
           data-author="pgmanor" >
            <span class="post-title" title="springboot多环境配置打包">springboot多环境配置打包</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-markdown-math-express/"
           data-tag="markdown"
           data-author="pgmanor" >
            <span class="post-title" title="markdown数学公式">markdown数学公式</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 I-----面试 "
           href="/blog/2020/12/31/blog-interview-java-question/"
           data-tag="面试"
           data-author="pgmanor" >
            <span class="post-title" title="java常见面试题">java常见面试题</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2020/12/31/blog-nginx-fast/"
           data-tag="nginx"
           data-author="pgmanor" >
            <span class="post-title" title="nginx为何这么快?">nginx为何这么快?</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 M--微服务 "
           href="/blog/2020/12/31/spring-initialzr/"
           data-tag="工具,initialzr"
           data-author="pgmanor" >
            <span class="post-title" title="spring initialzr环境编译发布">spring initialzr环境编译发布</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2020/12/31/blog-redis-memory-eliminate/"
           data-tag="redis"
           data-author="pgmanor" >
            <span class="post-title" title="Redis的内存淘汰策略">Redis的内存淘汰策略</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 M--微服务 "
           href="/blog/2020/12/31/blog-spring-pageable/"
           data-tag="分页"
           data-author="pgmanor" >
            <span class="post-title" title="vue+springboot分页交互">vue+springboot分页交互</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-python_base/"
           data-tag="python"
           data-author="pgmanor" >
            <span class="post-title" title="python基本语法">python基本语法</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 M--微服务 "
           href="/blog/2020/12/31/blog-spring-transaction/"
           data-tag="transactional"
           data-author="pgmanor" >
            <span class="post-title" title="Transactional注解">Transactional注解</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----测试 "
           href="/blog/2020/12/31/blog-test-ng/"
           data-tag="testng"
           data-author="pgmanor" >
            <span class="post-title" title="👍TestNG一篇足以">👍TestNG一篇足以</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----测试 "
           href="/blog/2020/12/31/blog-test-mockito/"
           data-tag="mock"
           data-author="pgmanor" >
            <span class="post-title" title="👍mockito测试框架">👍mockito测试框架</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----测试 "
           href="/blog/2020/12/31/blog-test-powermock/"
           data-tag="powermock"
           data-author="pgmanor" >
            <span class="post-title" title="powermock测试框架">powermock测试框架</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-tool-blogs-all/"
           data-tag="blog"
           data-author="pgmanor" >
            <span class="post-title" title="优质博客和文章">优质博客和文章</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 W-window "
           href="/blog/2020/12/31/blog-tool-windows-dev-install/"
           data-tag="windows"
           data-author="pgmanor" >
            <span class="post-title" title="windows开发环境安装">windows开发环境安装</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2020/12/31/blog-java-base-bigdecimal/"
           data-tag="bigdecimal"
           data-author="pgmanor" >
            <span class="post-title" title="BigDecimal正确使用了吗?">BigDecimal正确使用了吗?</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 W-----前端 "
           href="/blog/2020/12/31/blog-vue-element-admin/"
           data-tag="elementadmin"
           data-author="pgmanor" >
            <span class="post-title" title="vue element admin开发">vue element admin开发</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 M--微服务 "
           href="/blog/2020/12/31/blog-vue-springboot-package-publish/"
           data-tag="springboot"
           data-author="pgmanor" >
            <span class="post-title" title="vue+springboot打包发布">vue+springboot打包发布</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-java-dao-mycat/"
           data-tag="mycat"
           data-author="pgmanor" >
            <span class="post-title" title="分库分表中间件-MyCat">分库分表中间件-MyCat</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-tool-connect-github/"
           data-tag="github"
           data-author="pgmanor" >
            <span class="post-title" title="github无法访问解决办法">github无法访问解决办法</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2020/12/31/blog-java-install-windows/"
           data-tag="java"
           data-author="pgmanor" >
            <span class="post-title" title="jdk开发环境搭建">jdk开发环境搭建</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-ai-jupyter-notebook/"
           data-tag="jupyter"
           data-author="pgmanor" >
            <span class="post-title" title="jupyter notebook">jupyter notebook</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-chrome-plugin/"
           data-tag="chrome"
           data-author="pgmanor" >
            <span class="post-title" title="chrome插件">chrome插件</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-tool-git-error-name-too-long/"
           data-tag="git"
           data-author="pgmanor" >
            <span class="post-title" title="git文件名太长">git文件名太长</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-tool-git-setting/"
           data-tag="git"
           data-author="pgmanor" >
            <span class="post-title" title="git配置">git配置</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-python_tornado_info/"
           data-tag="tornado"
           data-author="pgmanor" >
            <span class="post-title" title="👍Tornado入门这一篇足以">👍Tornado入门这一篇足以</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-tool-maven/"
           data-tag="maven"
           data-author="pgmanor" >
            <span class="post-title" title="maven常用命令和配置">maven常用命令和配置</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-tool-notebook-joplin/"
           data-tag="joplin"
           data-author="pgmanor" >
            <span class="post-title" title="joplin笔记">joplin笔记</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-tool-notebook/"
           data-tag="notebook"
           data-author="pgmanor" >
            <span class="post-title" title="常见笔记软件">常见笔记软件</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2020/12/31/blog-fw-distributed-lock-redis-zk/"
           data-tag="lock,redis,zookeeper"
           data-author="pgmanor" >
            <span class="post-title" title="分布式锁用redis还是zk?">分布式锁用redis还是zk?</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-java-dao-shardingSphere/"
           data-tag="sharding-jdbc"
           data-author="pgmanor" >
            <span class="post-title" title="分库分表中间件-ShardingSphere">分库分表中间件-ShardingSphere</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----测试 "
           href="/blog/2020/12/31/blog-test-rest-assured-in-action/"
           data-tag="rest"
           data-author="pgmanor" >
            <span class="post-title" title="rest-assured实战">rest-assured实战</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 F-----架构 "
           href="/blog/2020/12/31/blog-microservice-why/"
           data-tag="微服务"
           data-author="pgmanor" >
            <span class="post-title" title="一定要使用微服务？">一定要使用微服务？</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2020/12/31/blog-java-tool-bean-map/"
           data-tag="beanmap"
           data-author="pgmanor" >
            <span class="post-title" title="工具类--bean和map互转">工具类--bean和map互转</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-mysql-common-sql/"
           data-tag="mysql"
           data-author="pgmanor" >
            <span class="post-title" title="mysql常用sql">mysql常用sql</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-python-tool-buildin-attr/"
           data-tag="attr"
           data-author="pgmanor" >
            <span class="post-title" title="👍python内置属性(魔法方法)">👍python内置属性(魔法方法)</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-python-tool-obj-dict/"
           data-tag="dict"
           data-author="pgmanor" >
            <span class="post-title" title="python对象与dict互转">python对象与dict互转</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2020/12/31/blog-java-tool-fastjson-bug/"
           data-tag="fastjson"
           data-author="pgmanor" >
            <span class="post-title" title="Fastjson远程代码高危漏洞">Fastjson远程代码高危漏洞</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 B---大数据 "
           href="/blog/2020/12/31/blog-spark-data-skew/"
           data-tag="spark"
           data-author="pgmanor" >
            <span class="post-title" title="spark数据倾斜及解决方案">spark数据倾斜及解决方案</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 B---大数据 "
           href="/blog/2020/12/31/blog-spark-version-3/"
           data-tag="spark"
           data-author="pgmanor" >
            <span class="post-title" title="spark3.0新特性">spark3.0新特性</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 W-window "
           href="/blog/2020/12/31/blog-tool-windows-cmd/"
           data-tag="windows"
           data-author="pgmanor" >
            <span class="post-title" title="windows常用命令和技巧">windows常用命令和技巧</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 W-window "
           href="/blog/2020/12/31/blog-tool-windows-less-dll/"
           data-tag="dll"
           data-author="pgmanor" >
            <span class="post-title" title="windows缺少dll">windows缺少dll</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/31/blog-tool-youdao-config-edit/"
           data-tag="有道云"
           data-author="pgmanor" >
            <span class="post-title" title="有道云配置修改">有道云配置修改</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 D--数据库 "
           href="/blog/2020/12/31/blog-java-jndi/"
           data-tag="jdni"
           data-author="pgmanor" >
            <span class="post-title" title="JNDI">JNDI</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2020/12/31/blog-java-online-analysis/"
           data-tag="性能分析"
           data-author="pgmanor" >
            <span class="post-title" title="JAVA线上故障排查全套路">JAVA线上故障排查全套路</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 P-python "
           href="/blog/2020/12/31/blog-tornado-sync-to-async/"
           data-tag="aysnc,tornado"
           data-author="pgmanor" >
            <span class="post-title" title="tornado同步转异步">tornado同步转异步</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 J-----java "
           href="/blog/2020/12/31/blog-java-tool-jackson/"
           data-tag="jackson"
           data-author="pgmanor" >
            <span class="post-title" title="工具类--jackson">工具类--jackson</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----测试 "
           href="/blog/2020/12/31/blog-rest-assured-wiki-info/"
           data-tag="rest"
           data-author="pgmanor" >
            <span class="post-title" title="rest-assured wiki翻译">rest-assured wiki翻译</span>
            <span class="post-date" title="2020-12-31 00:00:00">2020/12/31</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/30/blog-template/"
           data-tag="模板"
           data-author="pgmanor" >
            <span class="post-title" title="hexo博客自定义模板">hexo博客自定义模板</span>
            <span class="post-date" title="2020-12-30 00:00:00">2020/12/30</span>
        </a>
        
        <a  class="博客 T-----工具 "
           href="/blog/2020/12/27/blog-hexo-comments-valine/"
           data-tag="hexo"
           data-author="pgmanor" >
            <span class="post-title" title="hexo扩展评论valine">hexo扩展评论valine</span>
            <span class="post-date" title="2020-12-27 08:59:46">2020/12/27</span>
        </a>
        
        <a  class="博客 D-devops "
           href="/blog/2020/08/15/blog-devops-linux-shell-param/"
           data-tag="linux"
           data-author="pgmanor" >
            <span class="post-title" title="shell 脚本参数解析之getopt和getopts">shell 脚本参数解析之getopt和getopts</span>
            <span class="post-date" title="2020-08-15 00:00:00">2020/08/15</span>
        </a>
        
        <a  class="博客 T-----测试 "
           href="/blog/2020/08/08/blog-test-junit4v5/"
           data-tag="junit"
           data-author="pgmanor" >
            <span class="post-title" title="Junit4和Junit5差异">Junit4和Junit5差异</span>
            <span class="post-date" title="2020-08-08 00:00:00">2020/08/08</span>
        </a>
        
        <a  class="博客 D-devops "
           href="/blog/2020/08/01/blog-devops-linux-command/"
           data-tag="linux"
           data-author="pgmanor" >
            <span class="post-title" title="linux常用命令">linux常用命令</span>
            <span class="post-date" title="2020-08-01 00:00:00">2020/08/01</span>
        </a>
        
        <a  class="博客 D-devops "
           href="/blog/2020/08/01/blog-devops-linux-cmd-adv/"
           data-tag="linux"
           data-author="pgmanor" >
            <span class="post-title" title="linux几个高级命令">linux几个高级命令</span>
            <span class="post-date" title="2020-08-01 00:00:00">2020/08/01</span>
        </a>
        
    </nav>
</div>

    </div>
    <div class="hide-list">
        <div class="semicircle" data-title="切换全屏 快捷键 s">
            <div class="brackets first"><</div>
            <div class="brackets">&gt;</div>
        </div>
    </div>
</aside>
<div class="post">
    <div class="pjax">
        <article id="post-blog/blog-mysql-backup-extrabackup" class="article article-type-post" itemscope itemprop="blogPost">
    
        <h1 class="article-title">mysql备份-xtrabackup</h1>
    
    <div class="article-meta">
        
        
        <span class="author"><a>pgmanor</a></span>
        
        
        <span class="book">
            
                <a  data-rel="博客">博客</a>/
            
                <a  data-rel="D--数据库">D--数据库</a>
            
        </span>
        
        
        <span class="tag">
            
            <a class="color1">mysql</a>
            
        </span>
        
    </div>
    <div class="article-meta">
        
            发布时间 : <time class="date" title='最后更新: 2021-09-09 21:54:56'>2021-08-14 00:00</time>
        
    </div>
    <div class="article-meta">
        
        <span>字数:6k</span>
        
        
        <span id="busuanzi_container_page_pv">
            阅读 :<span id="busuanzi_value_page_pv">
                <span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </span>
        </span>
        
        
        <span class="top-comment" title="跳转至评论区">
            <a href="#comments">
                评论:<span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </a>
        </span>
        
    </div>
    
    <div class="toc-ref">
    
        <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-简介"><span class="toc-text">1.简介</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-1-优点"><span class="toc-text">1-1.优点</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-安装"><span class="toc-text">2.安装</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#2-1-xtrabackup2-x版本"><span class="toc-text">2-1.xtrabackup2.x版本</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-2-xtrabackup8-x版本"><span class="toc-text">2-2.xtrabackup8.x版本</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-使用"><span class="toc-text">3.使用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#3-0-命令介绍"><span class="toc-text">3-0.命令介绍</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-1-完全备份"><span class="toc-text">3-1.完全备份</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-2-增量备份"><span class="toc-text">3-2.增量备份</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-原理"><span class="toc-text">4.原理</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-脚本和定时"><span class="toc-text">5.脚本和定时</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#5-1-脚本"><span class="toc-text">5-1.脚本</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-2-添加定时"><span class="toc-text">5-2.添加定时</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#6-xtrabackup8-0版本的使用"><span class="toc-text">6.xtrabackup8.0版本的使用</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#6-1-安装"><span class="toc-text">6-1.安装</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-2-备份"><span class="toc-text">6-2.备份</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-3-恢复"><span class="toc-text">6-3.恢复</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#99-参考"><span class="toc-text">99.参考</span></a></li></ol>
    
<style>
    .left-col .switch-btn,
    .left-col .switch-area {
        display: none;
    }
    .toc-level-4 i,
    .toc-level-4 ol {
        display: none !important;
    }
</style>
</div>
    
    <div class="article-entry" itemprop="articleBody">
      
        <ul>
<li><a href="https://www.percona.com/doc/percona-xtrabackup/2.4/index.html" target="_blank" rel="noopener">mysq5-7对应xtrabackup2.x版本官网说明</a></li>
<li><a href="https://www.percona.com/doc/percona-xtrabackup/8.0/index.html" target="_blank" rel="noopener">mysq8对应xtrabackup8.x版本官网说明</a></li>
<li><a href="https://www.percona.com/downloads/Percona-XtraBackup-LATEST/" target="_blank" rel="noopener">官网下载地址</a></li>
</ul>
<h2 id="1-简介"><a href="#1-简介" class="headerlink" title="1.简介"></a>1.简介</h2><p>MySQL冷备、mysqldump、MySQL热拷贝都无法实现对数据库进行增量备份。在实际生产环境中增量备份是非常实用的，如果数据大于50G或100G，存储空间足够的情况下，<br>可以每天进行完整备份，如果每天产生的数据量较大，需要定制数据备份策略。例如每周实用完整备份，周一到周六实用增量备份。</p>
<p>innobackupex和mysqldump都可以对mysql进行热备份的，mysqldump对mysql的innodb的备份可以使用single-transaction参数来开启一个事务，利用innodb的mvcc来不进行锁表进行热备份，<br>mysqldump备份是逻辑备份，备份出来的文件是sql语句，所以备份和恢复的时候很慢，但是备份和恢复时候很清楚。<br>当MYSQL数据超过10G时，用mysqldump来导出备份就比较慢了，此种情况下用innobackupex这个工具就比mysqldump要快很多。利用它对mysql做全量和增量备份.</p>
<p>Percona-xtrabackup是 Percona公司开发的一个用于MySQL数据库物理热备的备份工具，支持MySQL、Percona server和MariaDB，开源免费，是目前较为受欢迎的主流备份工具。<br>xtrabackup只能备份innoDB和xtraDB两种数据引擎的表，而不能备份MyISAM数据表。</p>
<p>而Percona-Xtrabackup就是为了实现增量备份而出现的一款主流备份工具，xtrakackup有2个工具，分别是xtrabakup、innobakupe。</p>
<ul>
<li>xtrabackup 只能备份innodb和xtradb两种引擎的表，而不能备份myisam引擎的表。mysqld server 没有交互；C/C++ 编译的二进制；</li>
<li>innobackupex 是一个封装了xtrabackup的Perl脚本，支持同时备份innodb和myisam，但在对myisam备份时需要加一个全局的读锁。还有就是myisam不支持增量备份。 innobackupex 脚本用来备份非 InnoDB 表，同时会调用 xtrabackup 命令来备份 InnoDB 表，还会和 mysqld server 发送命令进行交互，如加读锁（FTWRL）、获取位点（SHOW SLAVE STATUS）等。 简单来说，innobackupex 在 xtrabackup 之上做了一层封装。</li>
</ul>
<p>一般情况下，我们是希望能备份MyISAM表的，虽然我们可能自己不用 MyISAM 表，但是 mysql 库下的系统表是 MyISAM 的，因此备份基本都通过 innobackupex 命令进行；另外一个原因是我们可能需要保存位点信息。</p>
<h3 id="1-1-优点"><a href="#1-1-优点" class="headerlink" title="1-1.优点"></a>1-1.优点</h3><ul>
<li>备份速度快，物理备份可靠</li>
<li>备份过程不会打断正在执行的事务（无需锁表）</li>
<li>能够基于压缩等功能节约磁盘空间和流量</li>
<li>自动备份校验</li>
<li>还原速度快</li>
<li>可以流传将备份传输到另外一台机器上</li>
<li>在不增加服务器负载的情况备份数据</li>
</ul>
<h2 id="2-安装"><a href="#2-安装" class="headerlink" title="2.安装"></a>2.安装</h2><p>官网下载rpm包或者tar.gz包解压就能用，此外需要通过yum安装依赖包libev</p>
<ul>
<li><a href="https://www.percona.com/doc/percona-xtrabackup/LATEST/installation.html" target="_blank" rel="noopener">官网安装说明</a></li>
</ul>
<p>Percona XtraBackup 8.0 是Percona XtraBackup新推出了一个针对MySQL8.0的版本，主要是MySQL8.0在Redo和数据库字典方面有了新的改进。<br>XtraBackup 2.4 继续支持MySQL5.6和5.7。</p>
<ul>
<li>移除了innobackupex命令；</li>
<li>由于新的MySQL重做日志和数据字典格式，8.0版本只支持mysql8.0和percona8.0；</li>
<li>早于mysql8.0的版本需要使用xtrabackup2.4备份和恢复.</li>
</ul>
<p>安装方式有多种，源码安装、rpm安装、yum安装等。具体可以查看官网。</p>
<ul>
<li><a href="https://www.percona.com/doc/percona-xtrabackup/2.4/index.html" target="_blank" rel="noopener">mysq5-7对应xtrabackup2.x版本官网说明</a></li>
<li><a href="https://www.percona.com/doc/percona-xtrabackup/8.0/index.html" target="_blank" rel="noopener">mysq8对应xtrabackup8.x版本官网说明</a></li>
<li><a href="https://www.percona.com/downloads/Percona-XtraBackup-LATEST/" target="_blank" rel="noopener">percona-xtrabackup各版本地址</a></li>
</ul>
<p>我们大多生产的数据库都是5.7，所以本文以mysql5.7对应的xtrabackup2.x版来讨论。</p>
<h3 id="2-1-xtrabackup2-x版本"><a href="#2-1-xtrabackup2-x版本" class="headerlink" title="2-1.xtrabackup2.x版本"></a>2-1.xtrabackup2.x版本</h3><p>如果你选择的targz方式安装的化，下载前首先查看使用系统的 libgcrypt 版本，下载对应的版本。</p>
<pre><code class="shell">yum list installed|grep libgcrypt</code></pre>
<blockquote>
<p>如果不是对应系统 libgcrypt 的版本，会出现如下报错：</p>
<p>innobackupex: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory</p>
</blockquote>
<p>然后去官网下载找到对应libgcrypt版本的压缩文件，比例libgcrypt的<code>1.5.3-14.el7</code>的找到<code>percona-xtrabackup-2.4.14-Linux-x86_64.libgcrypt153.tar.gz</code></p>
<p><strong>2.x本版安装</strong></p>
<ul>
<li><a href="https://www.percona.com/downloads/Percona-XtraBackup-2.4/LATEST/" target="_blank" rel="noopener">2.x个版本下载地址</a></li>
</ul>
<p>还是rpm安装简单，直接下载完后，yum安装即可。还不用创建软链接。</p>
<pre><code class="shell">#下载tar
wget -b -c https://downloads.percona.com/downloads/Percona-XtraBackup-2.4/Percona-XtraBackup-2.4.23/binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.23-1.el7.x86_64.rpm
# 查看下载进度
cat wget-log

# 解压
yum localinstall percona-xtrabackup-24-2.4.23-1.el7.x86_64.rpm

# 查看rpm查询路径和配置
rpm -ql percona-xtrabackup-24

# 删除
rpm -e percona-xtrabackup-24

# 验证
xtrabackup -v</code></pre>
<p>rpm包释放的可执行文件如下：</p>
<pre><code class="text">/usr/bin/innobackupex  # 封装过的perl脚本
/usr/bin/xbcloud
/usr/bin/xbcloud_osenv
/usr/bin/xbcrypt  # 加解密
/usr/bin/xbstream  # 并发写的流文件格式
/usr/bin/xtrabackup    # 主程序</code></pre>
<h3 id="2-2-xtrabackup8-x版本"><a href="#2-2-xtrabackup8-x版本" class="headerlink" title="2-2.xtrabackup8.x版本"></a>2-2.xtrabackup8.x版本</h3><p><strong>8.x本版安装</strong></p>
<pre><code class="shell">yum install libev -y
# 下载rpm
wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-8.0.4/binary/redhat/7/x86_64/percona-xtrabackup-80-8.0.4-1.el7.x86_64.rpm

# 安装本地rpm
yum localinstall percona-xtrabackup-80-8.0.4-1.el7.x86_64.rpm

# 查看rpm查询路径和配置
rpm -ql percona-xtrabackup-80

# 删除
rpm -e percona-xtrabackup-80</code></pre>
<p><strong>rpm查看安装结果</strong></p>
<pre><code class="text">/usr/bin/xbcloud
/usr/bin/xbcloud_osenv
/usr/bin/xbcrypt
/usr/bin/xbstream
/usr/bin/xtrabackup
/usr/lib64/xtrabackup/plugin/keyring_file.so
/usr/lib64/xtrabackup/plugin/keyring_vault.so
/usr/share/doc/percona-xtrabackup-80-8.0.4
/usr/share/doc/percona-xtrabackup-80-8.0.4/LICENSE
/usr/share/man/man1/innobackupex.1.gz
/usr/share/man/man1/xbcrypt.1.gz
/usr/share/man/man1/xbstream.1.gz
/usr/share/man/man1/xtrabackup.1.gz</code></pre>
<h2 id="3-使用"><a href="#3-使用" class="headerlink" title="3.使用"></a>3.使用</h2><h3 id="3-0-命令介绍"><a href="#3-0-命令介绍" class="headerlink" title="3-0.命令介绍"></a>3-0.命令介绍</h3><p>xtrabackup 有两个主要的工具：xtrabackup、innobackupex</p>
<ul>
<li>xtrabackup 只能备份 InnoDB 和 XtraDB 两种数据表</li>
<li>innobackupex 则封装了 xtrabackup,同时可以备份 MyISAM 数据表<blockquote>
<p>xtrabackup 命令只备份数据文件,并不备份数据表结构(.frm)，所以使用 xtrabackup 恢复的时候必须有对应表结构文件(.frm)。<br>用 innobackupex 命令，此命令相当于冷备份，复制数据目录的索引，数据，结构文件，但会有短暂的锁表（时间依赖于 MyISAM 大小，<br>对 MyISAM 进行锁表；MySQL 的 5.7 默认是 Innodb 引擎，但是系统表还是默认的 MyIASM 引擎，所以会对系统表进行短暂锁表操作）</p>
</blockquote>
</li>
</ul>
<p>innobackupex 完整备份后生成了几个重要的文件：</p>
<ul>
<li>xtrabackup_binlog_info：记录当前最新的 LOG Position</li>
<li>xtrabackup_binlog_pos_innodb:innodb log postion</li>
<li>xtrabackup_checkpoints: 存放备份的起始位置 beginlsn 和结束位置 endlsn,增量备份需要这个lsn(增量备份可以在这里面看 from 和 to 两个值的变化)</li>
<li>innobackupex: </li>
</ul>
<p><strong><code>innobackupex</code>命令参数</strong></p>
<pre><code class="shell">--defaults-file：指定my.cnf参数文件的位置(my.cnf配置文件里必须指定datadir)

--apply-log：同xtrabackup的--prepare参数,一般情况下,在备份完成后，数据尚且不能用于恢复操作，因为备份的数据中可能会包含尚未提交的事务或已经提交但尚未同步至数据文件中的事务。因此，此时数据文件仍处理不一致状态。
        --apply-log的作用是通过回滚未提交的事务及同步已经提交的事务至数据文件使数据文件处于一致性状态。

--copy-back：做数据恢复时将备份数据文件拷贝到MySQL服务器的datadir

--remote-host=HOSTNAME： 通过ssh将备份数据存储到进程服务器上

--stream=[tar]：备份文件输出格式,该文件可在XtarBackupbinary文件中获得. 在使用参数stream=tar备份的时候,你的xtrabackup_logfile可能会临时放在/tmp目录下,
                如果你备份的时候并发写入较大的话,xtrabackup_logfile可能会很大(5G+),很可能会撑满你的/tmp目录,可以通过参数--tmpdir指定目录来解决这个问题.

--tmpdir=DIRECTORY：当有指定--remote-host or --stream时, 事务日志临时存储的目录, 默认采用MySQL配置文件中所指定的临时目录tmpdir

--redo-only --apply-log：强制备份日志时只redo,跳过rollback,这在做增量备份时非常必要

--use-memory=*：该参数在prepare的时候使用,控制prepare时innodb实例使用的内存

--databases=LIST：列出需要备份的databases,如果没有指定该参数,所有包含MyISAM和InnoDB表的database都会被备份

--slave-info：备份从库, 加上--slave-info备份目录下会多生成一个xtrabackup_slave_info 文件, 这里会保存主日志文件以及偏移, 文件内容类似于:CHANGE MASTER TO MASTER_LOG_FILE=&#39;&#39;, MASTER_LOG_POS=0

--socket=SOCKET：指定mysql.sock所在位置，以便备份进程登录mysql.

--no-timestamp：不建立以时间命名的目录</code></pre>
<h3 id="3-1-完全备份"><a href="#3-1-完全备份" class="headerlink" title="3-1.完全备份"></a>3-1.完全备份</h3><pre><code class="shell">innobackupex --user=用户 --password=密码 /path/to/backup/dir/

innobackupex --defaults-file=/etc/my.cnf --user=用户 --password=密码 --databases=test --stream=tar /tmp/data/ 2&gt;/tmp/data/error.log|gzip 1&gt;/tmp/data/test.tar.gz

innobackupex --defaults-file=/etc/my.cnf --user=用户 --password=密码 --socket=/data/mysql/mysql.sock /mysql_data_bak/</code></pre>
<blockquote>
<p>生成的是一个以当前日期命名的文件夹。<br><code>--defaults-file</code> 必须放置命令行的第一个位置，不然报以下错误 <code>xtrabackup: Error: --defaults-file must be specified first on the command line</code></p>
<ul>
<li><code>--database=dbname</code> 单独对指定数据库做备份 ，若是不添加此参数那就是对全库做备份</li>
<li><code>2&gt;/tmp/data/error.log</code>       标准错误输出信息写入日志中</li>
<li><code>1&gt;/tmp/data/test.tar.gz</code>     打包压缩存储到该文件中</li>
</ul>
</blockquote>
<p>在备份的同时，innobackupex还会在备份目录中创建如下文件：</p>
<ul>
<li><strong>xtrabackup_checkpoints</strong>: 备份类型（如完全或增量）、备份状态（如是否已经为prepared状态）和LSN(Log Sequence Number日志序列号)范围信息；<br>每个InnoDB页(通常为16k大小)都会包含一个日志序列号，即LSN。LSN是整个数据库系统的系统版本号，每个页面相关的LSN能够表明此页面最近是如何发生改变的。</li>
<li><strong>xtrabackup_binlog_info</strong>: mysql服务器当前正在使用的二进制日志文件及至备份这一刻为止二进制日志事件的位置。</li>
<li><strong>xtrabackup_binlog_pos_innodb</strong>: 二进制日志文件及用于InnoDB或XtraDB表的二进制日志文件的当前position。</li>
<li><strong>xtrabackup_binary</strong>: 备份中用到的xtrabackup的可执行文件；</li>
<li><strong>backup-my.cnf</strong>: 备份命令用到的配置选项信息；</li>
<li><strong>xtrabackup_logfile</strong>: 备份的日志文件</li>
<li><strong>ibdata1</strong>:　　#数据文件</li>
</ul>
<p>在使用innobackupex进行备份时，还可以使用<code>--no-timestamp</code>选项来阻止命令自动创建一个以时间命名的目录；如此一来，innobackupex命令将会创建一个BACKUP-DIR目录来存储备份数据。</p>
<p>innobackupex：是将xtrabackup进行封装的perl脚本，提供了备份myisam表的能力。常用选项:</p>
<pre><code class="shell">常用选项:  
   --host     指定主机
   --user     指定用户名
   --password    指定密码
   --port     指定端口
   --databases     指定数据库
   --incremental    创建增量备份
   --incremental-basedir   指定包含完全备份的目录
   --incremental-dir      指定包含增量备份的目录   
   --apply-log        对备份进行预处理操作             
     一般情况下，在备份完成后，数据尚且不能用于恢复操作，因为备份的数据中可能会包含尚未提交的事务或已经提交但尚未同步至数据文件中的事务。
     因此，此时数据文件仍处理不一致状态。“准备”的主要作用正是通过回滚未提交的事务及同步已经提交的事务至数据文件也使得数据文件处于一致性状态。
   --redo-only      不回滚未提交事务
   --copy-back     恢复备份目录</code></pre>
<p><strong>完全备份、恢复示例：</strong></p>
<p><strong>在node1上执行：</strong></p>
<pre><code class="shell">/etc/init.d/mysqld stop
innobackupex --user=root --password=xxxx --no-timestamp /backups/
scp -rp /backups/ root@node2:/tmp</code></pre>
<p><strong>还可以在远程进行全量备份</strong></p>
<pre><code class="shell">innobackupex --defaults-file=/etc/my.cnf --user=root --host=127.0.0.1 --parallel=2 --throttle=200 /backup/mysql/data 2&gt;/backup/mysql/data/bak.log 1&gt;/backup/mysql/data/data +%Y-%m-%d_%H-%M%S</code></pre>
<blockquote>
<p>–user=root 备份操作用户名，一般都是root用户</p>
<p>–host=127.0.0.1 主机ip，本地可以不加（适用于远程备份）。注意要提前在mysql中授予连接的权限，最好备份前先测试用命令中的用户名、密码和host能否正常连接mysql。</p>
<p>–parallel=2 –throttle=200 并行个数，根据主机配置选择合适的，默认是1个，多个可以加快备份速度。</p>
<p>/backup/mysql/data 备份存放的目录</p>
<p>2&gt;/backup/mysql/data/bak.log 备份日志，将备份过程中的输出信息重定向到bak.log</p>
<p>这种备份跟上面相比，备份成功后，不会自动在备份目录下创建一个时间戳目录，需要如上命令中自己定义。</p>
</blockquote>
<p><strong>在node2上执行恢复：</strong></p>
<p>1.node2上停止mysql服务(如果启动的话)，并删除mysql的数据目录下所有文件:</p>
<pre><code class="shell">/etc/init.d/mysqld stop
rm -fr /data/mysql/*</code></pre>
<p>2.在node2上执行整理操作：</p>
<pre><code class="shell">innobackupex --defaults-file=/etc/my.cnf --user=root --use-memory=1G --apply-log /tmp/backups/</code></pre>
<blockquote>
<p><code>--apply-log</code> 的作用是通过回滚未提交的事务及同步已经提交的事务至数据文件处于一致性状态; 把已提交的事务合并到 ibdata 文件</p>
</blockquote>
<p>3.在node2上执行恢复操作，并修改文件属主属组：</p>
<pre><code class="shell">mkdir -p /data/mysql/
innobackupex --defaults-file=/etc/my.cnf --user=root --copy-back /tmp/backups/
chown -R mysql.mysql /data/mysql/*</code></pre>
<blockquote>
<p>与/etc/my.cnf 文件定义的 datadir 路径一致，不然数据库起不来</p>
</blockquote>
<ol start="4">
<li>重启</li>
</ol>
<pre><code class="shell">/etc/init.d/mysqld start

systemctl start mysqld

mysql -uroot –p
show databases;
use xxx;
show tables;</code></pre>
<p><strong>可能报错：</strong></p>
<pre><code class="text">sh: xtrabackup: command not found innobackupex: Error: no ‘mysqld’
group in MySQL options at
/home/mysql/admin/bin/percona-xtrabackup-2.1.9/innobackupex line 4350.</code></pre>
<blockquote>
<p>解决：将xtrabackup_55复制成xtrabackup即可</p>
</blockquote>
<pre><code class="shell">ls /home/mysql/admin/bin/percona-xtrabackup-2.1.9/
cp xtrabackup_55 xtrabackup</code></pre>
<p>从上面的恢复操作可以看出，执行恢复分为两个步骤：</p>
<ul>
<li>第一步恢复步骤是应用日志（apply-log），为了加快速度，一般建议设置–use-memory（如果系统内存充足，可以使用加大内存进行备份 ），<br>这个步骤完成之后，目录<code>/backup/mysql/data/2020-03-04_13-04-05/</code>下的备份文件已经准备就绪。</li>
<li>第二步恢复步骤是拷贝文件（copy-back），即把备份文件拷贝至原数据目录下。</li>
</ul>
<h3 id="3-2-增量备份"><a href="#3-2-增量备份" class="headerlink" title="3-2.增量备份"></a>3-2.增量备份</h3><p>每个InnoDB的页面都会包含一个LSN信息，每当相关的数据发生改变，相关的页面的LSN就会自动增长。这正是InnoDB表可以进行增量备份的基础，即innobackupex通过备份上次完全备份之后发生改变的页面来实现。</p>
<p>要实现第一次增量备份，可以使用下面的命令进行：</p>
<pre><code class="shell">innobackupex --user=root --password=xxxx --incremental /backup --incremental-basedir=BASEDIR</code></pre>
<blockquote>
<p><code>BASEDIR</code>指的是完全备份所在的目录，此命令执行结束后，<code>innobackupex</code>命令会在<code>/backup</code>目录中创建一个新的以时间命名的目录以存放所有的增量备份数据。<br>另外，在执行过增量备份之后再一次进行增量备份时，其<code>--incremental-basedir</code>应该指向上一次的增量备份所在的目录。</p>
</blockquote>
<p>注意: 增量备份仅能应用于InnoDB或XtraDB表，对于MyISAM表而言，执行增量备份时其实进行的是完全备份</p>
<p>准备(prepare)增量备份与整理完全备份有着一些不同，尤其要注意的是：</p>
<ul>
<li>需要在每个备份(包括完全和各个增量备份)上，将已经提交的事务进行<strong>重放</strong>。<strong>重放</strong>之后，所有的备份数据将合并到完全备份上。</li>
<li>基于所有的备份将未提交的事务进行<strong>回滚</strong>。</li>
</ul>
<p>于是，操作就变成了：</p>
<pre><code class="shell">innobackupex --apply-log --redo-only BASE-DIR</code></pre>
<p>接着执行：</p>
<pre><code class="shell"> innobackupex --apply-log --redo-only BASE-DIR --incremental-dir=INCREMENTAL-DIR-1</code></pre>
<p>而后是第二个增量：</p>
<pre><code class="shell">innobackupex --apply-log --redo-only BASE-DIR --incremental-dir=INCREMENTAL-DIR-2</code></pre>
<p>其中BASE-DIR指的是完全备份所在的目录，而INCREMENTAL-DIR-1指的是第一次增量备份的目录，INCREMENTAL-DIR-2指的是第二次增量备份的目录，<br>其它依次类推，即如果有多次增量备份，每一次都要执行如上的操作；</p>
<p><strong>增量备份、恢复示例：</strong></p>
<p>1.先做一个完全备份</p>
<pre><code class="shell">innobackupex --user=root --password=xxxx  /backups/</code></pre>
<blockquote>
<p> 会在/backups/下生成一个以当前时间命名的文件夹</p>
</blockquote>
<ol start="2">
<li>对数据表执行些修改等操作</li>
</ol>
<p>3.执行增量备份</p>
<pre><code class="shell">innobackupex --incremental /backups/ --incremental-basedir=/backups/2015-11-08_19-24-05</code></pre>
<blockquote>
<p>有时候查看增量备份的文件中的xtrabackup_checkpoints发现其数值没变化，可能是LSN变化太小了。执行大量的数据表修改等操作后，会发现其LSN是会变化的，有时候不变也是正常的。</p>
</blockquote>
<p>补充个脚本的方式执行全备份、增量备份：</p>
<pre><code class="shell"># 全备份：
innobackupex --defaults-file=/home/mysql/etc/my.cnf --user=root --password=密码 --host=127.0.0.1 --slave-info --parallel=2 --stream=tar  ./ |gzip -&gt; /mysql/bak/backup.tar.gz

# 增量备份：
innobackupex --user=root --password=123456 --incremental /backups/  --incremental-basedir=/backups/$(ls -l /backups| awk &#39;{print $NF}&#39;|tail -1)
# 将上面的2个添加到cron计划任务即可，备份的路径是/backups/目录下。</code></pre>
<p>4.合并备份文件</p>
<pre><code class="shell"># 全量合并
innobackupex --user=root --password=123456 --apply-log-only --redo-only /backups/2015-11-08_19-57-53/
# 增量合并
innobackupex --user=root --password=123456 --apply-log-only --redo-only /backups/2015-11-08_19-57-53/ --incremental-dir=/backups/2015-11-08_19-59-31/

cat /backups/2015-11-08_19-57-53/xtrabackup_checkpoints # 检验是否合并成功</code></pre>
<p>5.执行恢复数据到数据库的操作</p>
<pre><code class="shell"># 注意: 这里填的应该是basedir的路径
innobackupex --user=root --password=123456 --copy-back /backups/2015-11-08_19-57-53/
# 修改文件权限
chown -R mysql.mysql /data/mysql/
# 启动MySQL查看是否数据已恢复
/etc/init.d/mysqld start</code></pre>
<p>需要注意的是，增量备份仅能应用于InnoDB或XtraDB表，对于MyISAM表而言，执行增量备份时其实进行的是完全备份。</p>
<h2 id="4-原理"><a href="#4-原理" class="headerlink" title="4.原理"></a>4.原理</h2><p>innobackupex在后台线程不断追踪InnoDB的日志文件，然后复制InnoDB的数据文件。 数据文件复制完成之后，日志的复制线程也会结束。<br>这样就得到了不在同一时间点的数据副本和开始备份以后的事务日志。完成上面的步骤之后，就可以使用InnoDB崩溃恢复代码执行事务日志（redo log），以达到数据的一致性。</p>
<p><strong>备份的两个过程</strong></p>
<ul>
<li>backup，备份阶段，追踪事务日志和复制数据文件（物理备份）。</li>
<li>preparing，重放事务日志，使所有的数据处于同一个时间点，达到一致性状态。</li>
</ul>
<p><strong>工具工作原理</strong></p>
<ul>
<li>1.首先完成一个完全备份，并记录下此时检查点的LSN(Log Sequence Number)。</li>
<li>2.在进行增量备份时，比较表空间中每个页的LSN是否大于上次备份时的LSN，如果是，则备份该页，同时记录当前检查点的LSN。<br>首先，在logfile中找到并记录最后一个checkpoint(<code>last checkpoint LSN</code>)，然后开始从LSN的位置开始拷贝InnoDB的logfile到xtrabackup_logfile；<br>接着，开始拷贝全部的数据文件.ibd；在拷贝全部数据文件结束之后，才停止拷贝logfile。<br>因为logfile里面记录全部的数据修改情况，所以，即时在备份过程中数据文件被修改过了，恢复时仍然能够通过解析xtrabackup_logfile保持数据的一致。</li>
</ul>
<p><strong>整个备份过程如下图</strong>：</p>
<p><img src="/blog/images/blog/db/xtrabackup-process.png" alt="extrabackup流程图"></p>
<ul>
<li>1.innobackupex 在启动后，会先 fork 一个进程，启动 xtrabackup进程，然后就等待 xtrabackup 备份完 ibd 数据文件；</li>
<li>2.xtrabackup 在备份 InnoDB 相关数据时，是有2种线程的，1种是 redo 拷贝线程，负责拷贝 redo 文件，1种是 ibd 拷贝线程，负责拷贝 ibd 文件；redo 拷贝线程只有一个，在 ibd 拷贝线程之前启动，在 ibd 线程结束后结束。xtrabackup 进程开始执行后，先启动 redo 拷贝线程，从最新的 checkpoint 点开始顺序拷贝 redo 日志；然后再启动 ibd 数据拷贝线程，在 xtrabackup 拷贝 ibd 过程中，innobackupex 进程一直处于等待状态（等待文件被创建）。</li>
<li>3.xtrabackup 拷贝完成idb后，通知 innobackupex（通过创建文件），同时自己进入等待（redo 线程仍然继续拷贝）;</li>
<li>4.innobackupex 收到 xtrabackup 通知后，执行FLUSH TABLES WITH READ LOCK (FTWRL)，取得一致性位点，然后开始备份非 InnoDB 文件（包括 frm、MYD、MYI、CSV、opt、par等）。拷贝非 InnoDB 文件过程中，因为数据库处于全局只读状态，如果在业务的主库备份的话，要特别小心，非 InnoDB 表（主要是MyISAM）比较多的话整库只读时间就会比较长，这个影响一定要评估到。</li>
<li>5.当 innobackupex 拷贝完所有非 InnoDB 表文件后，通知 xtrabackup（通过删文件） ，同时自己进入等待（等待另一个文件被创建）；</li>
<li>6.xtrabackup 收到 innobackupex 备份完非 InnoDB 通知后，就停止 redo 拷贝线程，然后通知 innobackupex redo log 拷贝完成（通过创建文件）；</li>
<li>7.innobackupex 收到 redo 备份完成通知后，就开始解锁，执行 UNLOCK TABLES；</li>
<li>8.最后 innobackupex 和 xtrabackup 进程各自完成收尾工作，如资源的释放、写备份元数据信息等，innobackupex 等待 xtrabackup 子进程结束后退出。</li>
</ul>
<h2 id="5-脚本和定时"><a href="#5-脚本和定时" class="headerlink" title="5.脚本和定时"></a>5.脚本和定时</h2><h3 id="5-1-脚本"><a href="#5-1-脚本" class="headerlink" title="5-1.脚本"></a>5-1.脚本</h3><p>下面提供简单的脚本。只是做演示，如何使用，并cron定时。</p>
<p><strong>backup_full.sh 全量备份脚本</strong></p>
<pre><code class="shell">#!/bin/bash

backupDir=/apps/pgmanor/backup/mysql

fullBackupDir=$backupDir/full

if [ ! -d &quot;$fullBackupDir&quot; ]; then
        echo &quot;创建文件夹&quot;
        mkdir -p $fullBackupDir
else
        echo &quot;文件夹已存在&quot;
fi

# 全量备份
#innobackupex --defaults-file=/etc/my.cnf --user=用户 --password=密码 $backupDir/full 2&gt;$fullBackupDir/backup_$(date +%F_%H-%M-%S).log

# 某库-全量备份并压缩
#innobackupex --defaults-file=/etc/my.cnf --user=用户 --password=密码 --databases=xxx --host=127.0.0.1 --socket=/tmp/mysql.sock --slave-info --parallel=2 --throttle=200 --stream=tar $fullBackupDir 2&gt;$fullBackupDir/backup_$(date +%F_%H-%M-%S).log | gzip 1&gt; $fullBackupDir/backup$(date +%F_%H-%M-%S).tar.gz

# 全库-全量备份并压缩
innobackupex --defaults-file=/etc/my.cnf --user=用户 --password=密码 --host=127.0.0.1 --socket=/tmp/mysql.sock --slave-info --parallel=2 --throttle=200 --stream=tar $fullBackupDir 2&gt;$fullBackupDir/backup_$(date +%F_%H-%M-%S).log | gzip -&gt; $fullBackupDir/backup$(date +%F_%H-%M-%S).tar.gz</code></pre>
<p><strong>backup_delta.sh 增量备份脚本</strong></p>
<pre><code class="shell">#!/bin/bash
#!/bin/bash

backupDir=/apps/pgmanor/backup/mysql

if [ ! -d &quot;$deltaBackupDir&quot; ]; then
        echo &quot;创建文件夹:&quot;$backupDir
        mkdir -p $backupDir
else
        echo &quot;文件夹已存在:&quot;$backupDir
fi

# 增量备份
innobackupex --user=用户 --password=用户 --incremental $backupDir --incremental-basedir=$backupDir/$(ls -l $backupDir | awk &#39;{print $NF}&#39;|tail -1)</code></pre>
<p><strong>backup_clear.sh 定时删除过期备份，只保留一周的备份</strong></p>
<pre><code class="shell">#!/bin/bash

backupDir=/apps/pgmanor/backup/mysql

# 清除一个星期前全量备份
find $backupDir/full -mtime +7 -exec rm -rf {} \;

# 清除一个星期前增量备份
find $backupDir/delta -mtime +7 -exec rm -rf {} \;</code></pre>
<h3 id="5-2-添加定时"><a href="#5-2-添加定时" class="headerlink" title="5-2.添加定时"></a>5-2.添加定时</h3><p><code>crontab -e</code>打开编辑</p>
<pre><code class="shell">10 0 * * * /apps/pgmanor/db/mysql/script/innobackup.sh
00 00 * * * /home/script/mysql_clear.sh &gt;/dev/null 2&gt;&amp;1</code></pre>
<h2 id="6-xtrabackup8-0版本的使用"><a href="#6-xtrabackup8-0版本的使用" class="headerlink" title="6.xtrabackup8.0版本的使用"></a>6.xtrabackup8.0版本的使用</h2><blockquote>
<p>命令没执行过，执行从官网copy下来，做个记录，因为我的mysql的版本使用是5.7的。</p>
<p><code>innobackupex</code> 是2.x版本的命令，8.x使用的是<code>xtrabackup</code>，其他命令选项和步骤都差不多。</p>
</blockquote>
<h3 id="6-1-安装"><a href="#6-1-安装" class="headerlink" title="6-1.安装"></a>6-1.安装</h3><pre><code class="shell">yum install libev -y
# 下载rpm
wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-8.0.4/binary/redhat/7/x86_64/percona-xtrabackup-80-8.0.4-1.el7.x86_64.rpm

# 安装本地rpm
yum localinstall percona-xtrabackup-80-8.0.4-1.el7.x86_64.rpm</code></pre>
<h3 id="6-2-备份"><a href="#6-2-备份" class="headerlink" title="6-2.备份"></a>6-2.备份</h3><p>全备xbstream：</p>
<pre><code class="shell">xtrabackup --login-path=xtrlogin  --parallel=2 --stream=xbstream --extra-lsndir=/mysqlbackup/node2/checkpoint  --tmpdir=/mysqlbackup/node2/tmp   --backup  --target-dir=/mysqlbackup/node2</code></pre>
<p>增备：</p>
<pre><code class="shell">xtrabackup --login-path=xtrlogin  --parallel=2 --stream=xbstream --extra-lsndir=/mysqlbackup/node2/checkpoint  --backup --incremental-basedir=/mysqlbackup/node2/checkpoint --backup  --target-dir=/mysqlbackup/node2</code></pre>
<h3 id="6-3-恢复"><a href="#6-3-恢复" class="headerlink" title="6-3.恢复"></a>6-3.恢复</h3><p>全备恢复：</p>
<pre><code class="shell">xtrabackup  --prepare --parallel=2 --use-memory=1g   --apply-log-only   --target-dir=/mysqlbackup/node2</code></pre>
<p>增备恢复：</p>
<pre><code class="shell">xtrabackup --prepare --use-memory=1g  --parallel=2 --apply-log-only  --target-dir=/mysqlbackup/node2 --incremental-dir=/mysqlbackup/node2/checkpoint</code></pre>
<p>应用事务日志+回滚未提交：</p>
<pre><code class="shell">xtrabackup  --prepare --use-memory=1g  --parallel=2  --target-dir=/mysqlbackup/node2</code></pre>
<p>最后一步copy把备份复制到datadir目录下：</p>
<pre><code class="shell">xtrabackup --copy-back --target-dir=/mysqlbackup/node2</code></pre>
<h2 id="99-参考"><a href="#99-参考" class="headerlink" title="99.参考"></a>99.参考</h2><ul>
<li><a href="https://blog.csdn.net/qq_40907977/article/details/109112060" target="_blank" rel="noopener">MySQL之 XtraBackup 备份</a></li>
<li><a href="https://www.cnblogs.com/linuxk/p/9372990.html" target="_blank" rel="noopener">Xtrabackup备份与恢复</a></li>
<li><a href="https://www.cnblogs.com/gomysql/p/3650645.html" target="_blank" rel="noopener">xtrabackup 详解</a></li>
<li><a href="http://mysql.taobao.org/monthly/2016/03/07/" target="_blank" rel="noopener">Percona XtraBackup 备份原理</a></li>
<li><a href="https://blog.csdn.net/eagle89/article/details/107606775" target="_blank" rel="noopener">MySql8.0.20+percona-xtrabackup-80-8.0.13备份与恢复</a></li>
<li><a href="https://ld246.com/article/1562078219377" target="_blank" rel="noopener">XtraBackup的介绍及使用</a></li>
<li><a href="https://www.cnblogs.com/heyongboke/p/9946722.html" target="_blank" rel="noopener">Xtrabackup的安装与使用</a></li>
</ul>

      
       <hr><span style="font-style: italic;color: gray;"> 转载请注明来源，欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论，也可以邮件至 pgmanor@qq.com </span>
    </div>
</article>


<p>
    <a  class="dashang" onclick="dashangToggle()">赏</a>
</p>


<div class="article_copyright">
    <p><span class="copy-title">文章标题:</span>mysql备份-xtrabackup</p>
    <p><span class="copy-title">字数:</span><span class="post-count">6k</span></p>
    <p><span class="copy-title">本文作者:</span><a  title="pgmanor">pgmanor</a></p>
    <p><span class="copy-title">发布时间:</span>2021-08-14, 00:00:00</p>
    <p><span class="copy-title">最后更新:</span>2021-09-09, 21:54:56</p>
    <span class="copy-title">原始链接:</span><a class="post-url" href="/blog/2021/08/14/blog-mysql-backup-xtrabackup/" title="mysql备份-xtrabackup">https://pgmanor.gitee.io/blog/2021/08/14/blog-mysql-backup-xtrabackup/</a>
    <p>
        <span class="copy-title">版权声明:</span><i class="fa fa-creative-commons"></i> <a rel="license noopener" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" title="CC BY-NC-SA 4.0 International" target = "_blank">&#34;署名-非商用-相同方式共享 4.0&#34;</a> 转载请保留原文链接及作者。
    </p>
</div>



    <div id="comments"></div>

<script src="/blog/js/valine.min.js"></script>

<script type="text/javascript">
    new Valine({
        el: '#comments',
        appId: 'g5VDso59rLvb68pq56BNnQ7A-gzGzoHsz',
        appKey: '2bebBs4aVT95Btj4j9zJve2O',
        placeholder: '说点什么...',
        avatar: 'monsterid',
        visitor : 'false'
    })
</script>




    




    </div>
    <div class="copyright">
        <p class="footer-entry">©2021 pgmanor</p>
<!--<p class="footer-entry">Built with <a href="https://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/yelog/hexo-theme-3-hexo" target="_blank">3-hexo</a> theme</p>-->

    </div>
    <div class="full-toc">
        <button class="full" data-title="切换全屏 快捷键 s"><span class="min "></span></button>
<button class="post-toc-menu" data-title="打开TOC 快捷键 w"><span class="post-toc-menu-icons"></span></button>
<div class="post-toc"><span class="post-toc-title">目录</span>
    <div class="post-toc-content">

    </div>
</div>
<a class="" id="rocket" ></a>

    </div>
</div>
<div class="acParent"></div>

<div class="hide_box" onclick="dashangToggle()"></div>
<div class="shang_box">
    <a class="shang_close"  onclick="dashangToggle()">×</a>
    <div class="shang_tit">
        <p>喜欢就点赞,疼爱就打赏</p>
    </div>
    <div class="shang_payimg">
        <div class="pay_img">
            <img src="/blog/img/alipay.jpg" class="alipay" title="扫码支持">
            <img src="/blog/img/weixin.jpg" class="weixin" title="扫码支持">
        </div>
    </div>
    <div class="shang_payselect">
        <span><label><input type="radio" name="pay" checked value="alipay">支付宝</label></span><span><label><input type="radio" name="pay" value="weixin">微信</label></span>
    </div>
</div>


</body>
<script src="/blog/js/jquery.pjax.js?v=1.0.1x" ></script>

<script src="/blog/js/script.js?v=1.0.1x" ></script>
<script>
    var img_resize = 'default';
    /*作者、标签的自动补全*/
    $(function () {
        $('.search').AutoComplete({
            'data': ['@pgmanor','#AQS','#attr','#aysnc','#beanmap','#bigdecimal','#blog','#chrome','#dict','#dll','#doc','#docker','#domain','#elementadmin','#es','#excel','#farm','#fastjson','#func','#git','#github','#guide','#hadoop','#hexo','#idea','#initialzr','#jackson','#java','#jboss','#jdni','#jetbrains','#jfinalshell','#joplin','#JPA','#junit','#jupyter','#keepavlie','#kill','#linux','#LocalDate','#lock','#markdown','#maven','#message','#mock','#mq','#mycat','#mysql','#nginx','#notebook','#postman','#powermock','#python','#redis','#rest','#sharding-jdbc','#spark','#springboot','#testng','#tornado','#track','#transactional','#uuid','#vuepress','#web','#windows','#zookeeper','#分库分表','#分页','#加密','#启动','#工具','#并发','#序列化','#微服务','#性能分析','#手册','#有道云','#模板','#百度云盘','#算法','#面试','#项目',],
            'itemHeight': 20,
            'width': 418
        }).AutoComplete('show');
    })
    function initArticle() {
        /*渲染对应的表格样式*/
        
            $(".post .pjax table").addClass("green_title");
        

        /*渲染打赏样式*/
        
        $("input[name=pay]").on("click", function () {
            if($("input[name=pay]:checked").val()=="weixin"){
                $(".shang_box .shang_payimg .pay_img").addClass("weixin_img");
            } else {
                $(".shang_box .shang_payimg .pay_img").removeClass("weixin_img");
            }
        })
        

        /*高亮代码块行号*/
        
        $('pre code').each(function(){
            var lines = $(this).text().trim().split('\n').length, widther='';
            if (lines>99) {
                widther = 'widther'
            }
            var $numbering = $('<ul/>').addClass('pre-numbering ' + widther).attr("unselectable","on");
            $(this).addClass('has-numbering ' + widther)
                    .parent()
                    .append($numbering);
            for(var i=1;i<=lines;i++){
                $numbering.append($('<li/>').text(i));
            }
        });
        

        /*访问数量*/
        
        $.getScript("//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");
        

        /*代码高亮，行号对齐*/
        $('.pre-numbering').css('line-height',$('.has-numbering').css('line-height'));

        
        
    }

    /*打赏页面隐藏与展示*/
    
    function dashangToggle() {
        $(".shang_box").fadeToggle();
        $(".hide_box").fadeToggle();
    }
    

</script>

<!--加入行号的高亮代码块样式-->

<style>
    pre{
        position: relative;
        margin-bottom: 24px;
        border-radius: 10px;
        border: 1px solid #e2dede;
        background: #FFF;
        overflow: hidden;
    }
    code.has-numbering{
        margin-left: 30px;
    }
    code.has-numbering.widther{
        margin-left: 35px;
    }
    .pre-numbering{
        margin: 0px;
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        padding: 0.5em 3px 0.7em 5px;
        border-right: 1px solid #C3CCD0;
        text-align: right;
        color: #AAA;
        background-color: #fafafa;
    }
    .pre-numbering.widther {
        width: 35px;
    }
</style>

<!--自定义样式设置-->
<style>
    
    
    .nav {
        width: 442px;
    }
    .nav.fullscreen {
        margin-left: -442px;
    }
    .nav-left {
        width: 120px;
    }
    
    
    @media screen and (max-width: 1468px) {
        .nav {
            width: 442px;
        }
        .nav.fullscreen {
            margin-left: -442px;
        }
        .nav-left {
            width: 150px;
        }
    }
    
    
    @media screen and (max-width: 1024px) {
        .nav {
            width: 442px;
            margin-left: -442px
        }
        .nav.fullscreen {
            margin-left: 0;
        }
        .nav .hide-list.fullscreen {
            left: 442px
        }
    }
    
    @media screen and (max-width: 426px) {
        .nav {
            width: 100%;
        }
        .nav-left {
            width: 100%;
        }
    }
    
    
    .nav-right .title-list nav a .post-title, .nav-right .title-list #local-search-result a .post-title {
        color: #383636;
    }
    
    
    .nav-right .title-list nav a .post-date, .nav-right .title-list #local-search-result a .post-date {
        color: #5e5e5f;
    }
    
    
    .nav-right nav a.hover, #local-search-result a.hover{
        background-color: #e2e0e0;
    }
    
    

    /*列表样式*/
    
    .post .pjax article .article-entry>ol, .post .pjax article .article-entry>ul, .post .pjax article>ol, .post .pjax article>ul{
        border: #e2dede solid 1px;
        border-radius: 10px;
        padding: 10px 32px 10px 56px;
    }
    .post .pjax article .article-entry li>ol, .post .pjax article .article-entry li>ul,.post .pjax article li>ol, .post .pjax article li>ul{
        padding-top: 5px;
        padding-bottom: 5px;
    }
    .post .pjax article .article-entry>ol>li, .post .pjax article .article-entry>ul>li,.post .pjax article>ol>li, .post .pjax article>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    .post .pjax article .article-entry li>ol>li, .post .pjax article .article-entry li>ul>li,.post .pjax article li>ol>li, .post .pjax article li>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    

    /* 背景图样式 */
    
    


    /*引用块样式*/
    

    /*文章列表背景图*/
    

    
</style>






<div class="mobile-menus-out" >

</div>
<div class="mobile-menus">
    
    
    
    <a class="dynamic-menu " target="_blank"  href="https://www.iworkh.com/">iworkh</a>
    
    
    <a class="dynamic-menu " target="_blank"  href="https://gitee.com/pgmanor">gitee</a>
    
</div>


<div style="position:absolute; bottom: 0; right: 0;">
    <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=150 height=40 src="//music.163.com/outchain/player?type=2&id=1323150930&auto=0&height=32"></iframe>
</div>

</html>
